00:08 Quick disclaimer before getting started. To keep this tutorials runtime shorter, this video assumes you're
using the project files from my gumroad.
00:15 You can still follow along without them,
but prior knowledge of Ue5 landscape
materials and PCGs will be helpful.
00:25 To get started today, we're going to need to grab a real world
height map using satellite data.
00:30 There's a fantastic free tool. I'm going to leave a link in the video
description.
00:36 It allows you to pan around and pull
height maps from a variety of sources,
00:41 as well as color
maps and street view maps. So it really is a very useful tool,
00:48 but if you don't know yet
where you want to grab a height map from, the best way that I've
found is to use Google Maps.
00:57 And if you're going to use Google Maps,
go down to your layer properties in the bottom left
and make sure that you have globe view on.
01:05 And what this will allow you to do is look around the earth in a projected 3D.
01:11 This is a really easy way to get an understanding
of some basic elevational differences, and to really pick out
some interesting spots.
01:20 Once you have a spot
that you find interesting, you can right
click on it and copy the coordinates.
01:27 I have a notepad open here,
and I usually just copy paste the coordinates there,
so I have them for reference later on.
01:34 Then you can hop back over to your unreal
PNG height map tool,
01:39 and just take those coordinates
from before and paste them into the latitude
and longitude boxes down below.
01:51 For today's tutorial, however, I have a different location in mind
just off the coast of Tokyo
01:57 is a very beautiful island
called Hachi Dojima, and on that island are two volcanoes.
02:05 I thought it'd be quite fitting considering the first tutorial
I did had one mountain. So let's make the Gaia 2.0 tutorial.
02:12 Have two mountains. As I'm getting everything lined up here
for the heightmap export.
02:17 Take note of the, dimensions of this a 20 by 20 kilometer export.
02:26 This time around, I think I'm going to do
more of a game scale, representation rather than 1 to 1.
02:32 I might do 1 to 20 scale. And once you have everything
02:38 lined up,
go ahead and click on Generate Heightmap. And it should automatically download the
heightmap of the area you have selected.
02:48 If you
also want to save a snapshot of the, topography
or the world imagery of this area as well,
02:56 you can do that by clicking
on the Generate Albedo from view, and that will compose the tiles,
and I will automatically download it
03:04 as well. Now that we have everything
exported, let's hop over to Gaia 2.0.
03:12 And here you'll see a familiar scene. If you followed my previous tutorial
on Gaia 1.0,
03:20 I thought a lot
about how to approach this tutorial, and I decided the best way to go about
it was to start with a new landscape
03:29 and show you how I would change things
to adapt to the file format.
03:35 I'm going to be explaining each node
one by one, so if you don't have the file,
03:40 you can still follow along and copy
the settings that I'm using.
03:47 To get started today,
let's hop back over to the Landscape Shaping tab and click
on the very first node here the file node.
03:53 And if you downloaded
directly from Gumroad, this node will most likely be baked. So first thing we need to do
is unmake the node.
04:01 And that will give us access
to the file path. So now let's bring in
04:07 the previously exported heightmap. And you'll see here that the
04:13 elevation is quite intense. So there's a couple ways to go about this.
04:19 We could use an adjustment layer
to clamp it, or we can adjust it via
the project settings.
04:25 So if you go to project build settings
and then down to terrain, you can adjust the terrain definition.
04:31 And this will automatically
scale the maximum heights. Now you could give it a good guess as to,
04:37 your definitions
based on these examples below. Or you could Google if you know the exact
location and name of the mountain.
04:47 The height. And here I found that
the volcano that we are using is 854m tall.
04:55 So I'm going to plug that in. However, something to keep in mind.
04:60 This will put a permanent clamp
on your entire project. So if you wanted to use an additive mask
or adjustment layer,
05:07 that addition to the maximum
height will just be cut off. So the best practice
that I have found to use
05:15 is to actually double this height. And from there
that gives you some headroom,
05:20 to do some addition masks if you so want. So here I'm going to go with 1720
instead of the previous height.
05:28 And then from there we can have
that height using an adjustment layer.
05:33 So that's exactly what I'm going
to do here. Using an adjustment layer. Let's go down to the clamp.
05:40 And if you right click on the numbers
you can manually input. Here I put 0.5 and this is
the realistic scale of these mountains.
05:49 However because I'm going to be making
this more of a gamified representation.
05:54 I'm going to go with a heroic scale
and bump it up just a little bit to 0.6.
05:59 Okay, that's looking pretty good. The next node we have is the soft clip. And that was for,
06:07 turning down the rough edges
on a lower resolution heightmap. But since this heightmap is pretty good,
we're just going to bypass
06:14 that one and go straight to the reverse. So there are two ways to approach rivers
with this.
06:20 We can go for an artificially generated
version. And Guy will take care of, 
randomly placing rivers
06:28 or if you want to keep it more realistic, you can bring in your own river mask,
06:35 by drawing over Photoshop or, masking yourself and then again,
importing the mask separately.
06:42 But before we get to that, I know for a fact
we are going to need to mask out
06:48 the island themselves,
separating the ocean from the land. This is going to be a very useful mask
for several reasons.
06:54 So let's go ahead and create that now. I'm going to right
click on the body of the graph
06:59 and type in adjust to grab an adjustment
layer. Go ahead and connect
that to the previous adjustment layer.
07:05 And then we're going
to head over to the clip. And we're going to clip the bottom. And then the very top of the island down
to almost nothing.
07:13 So that we mask out the very bottom of the
island right where it touches the water.
07:18 And again, here I'm right
clicking on the numbers to put in a manual input
in order to really get things exact.
07:26 So from here let's add another adjustment layer
by right clicking and typing. Adjust.
07:33 And this adjustment layer
we're going to want to equalize and use a strong adjustment filter
07:41 in order to really harden
the edges and get a mask. So now that we have a node
that clearly differentiates
07:48 the land from the water,
we can use this in a variety of places, from generating,
rocky edges or sandy edges to texturing.
07:57 So in order to use this easily
on another part of the graph, I'm going to draw out
one more adjustment layer.
08:06 And then to expand the node
I'm going to double click on it. And from there you can right
click and rename.
08:13 Let's rename this one to Island Mask.
08:18 And if you right click on the out portion you can go to Manage Portals
by or by pressing P on the keyboard
08:25 and create an out portal,
and this will make it easier to reroute it to different parts
of the graph or different tabs later on.
08:33 And then also, we're going to need to invert this. It'll be more useful
later on as an inverted mask.
08:41 And this is something that Gaia one used
to do automatically. But in go two
you need to change it manually.
08:47 If you want to visualize this as a mask
instead of a height field. You can do so by going to the upper
right and changing it.
08:54 There. The visualization
though, might still be bugged. I'm not sure.
08:59 It still shows
the height field below the mask, so it can be a bit confusing this way,
09:06 but now that we have our mask figured out, let's, move on to start
generating our rivers.
09:12 There's two ways. Again, as I said before, you can go about this,
you could bring in your own river mask, or you can generate them yourself
using GUI as tools.
09:20 Here I'm using the river node,
and I'm going to be playing around with the seed settings
until I find a layout that I like.
09:27 You can see that I set the water
and the width to pretty high values. This is because in
09:33 unreal, we're going to be doing
a visual representation of the river, and if the water is too thin,
09:39 can get a bit, lost in the resolution. So I set those pretty high
09:45 here.
I found a layout that was pretty good. So I'm just going to open up notepad again
and save that seed value.
09:51 And I'm going to keep trying until I find
something that fits a little better. But, if I don't find anything, I can
hop back to that previous seed value.
09:59 No problem. Okay, so after about five minutes
of searching, I came across this
10:05 particular seed value and I think it works
with the landscape quite well. So let's move forward with this one.
10:12 As you can see, the rivers have extended far outside of the island
into the ocean area.
10:18 So we're going to be bringing
in the island mask that we made previously
to mask off those areas.
10:26 I'm going to add a combine node
and then bring over the island mask to that combine,
and then set that node to subtract.
10:38 So let's go over to the ratio here and turn it up a bit
and see how it's cutting in.
10:43 I'm noticing that the cut is a bit
more inland than I'd like. So I'm going to add a blur node here
10:50 and connect that blur node to the second
input of that. Combine.
10:55 Things are getting a bit tight,
so let's move, these nodes over a bit.
11:03 Down pretty low. So it isn't too extreme.
11:09 Now let's go back to our combine node
and check the radius again. And the cut is still pretty inland
and still pretty harsh.
11:15 So I think I need to go back to my island
mask and adjust the values just a little bit.
11:25 So on this first adjustment node here, I'm going to adjust
the clip value down to 0.02.
11:31 And I can see now it's getting that edge of the island that we missed before.
11:36 And that should create a better mask
than what we had previously. Now let's go ahead back to the combine
node and take a look at the ratio again.
11:45 And yeah it's creating a much nicer
smooth drop off. This we can work with.
11:51 So things are looking good,
but I'm still noticing a bit of artifacting inside of the ocean area.
11:59 So let's add one more adjustment node, and we're just going to clip the bottom
of our height map
12:06 until it all smooths out
and is perfectly flat. So I'm going to bring up
the clip value to about 0.01.
12:15 And that's looking much cleaner.
12:22 Okay. Things are looking pretty good. So from here let's connect this,
adjustment layer down to the blur node
12:29 here. As well as we're going to connect it to the ground node
12:37 the ground texture node beside it. And I'm going to just organize
12:42 a little bit and explain 
the purpose of these next few nodes here. So in the unreal visualization
side of things, I have a simple,
12:52 river system
set up for visualization purposes. But there are some restrictions to the
maximum angle that those rivers can take.
13:01 So I'm basically blurring the landscape and then deriving a slope value
13:08 and masking the rivers that go below
that slope value. In order to restrict the river mask
13:16 to a flat or near flat region of the map.
13:21 This will help later on and it'll become clearer,
in the next tutorial. The ground texture node
13:30 is just adding a bit more detail
to the landscape itself. It's not necessary. But I like to do it to add a bit
more grit.
13:37 If you were to go to the root
of creating your own water mask or river mask to use,
you would put it into the file node here.
13:45 This could be done by tracing it in Photoshop from, a Google satellite image.
13:51 And then from the end of this node chain,
you want to connect it into that same,
13:57 combine node up here. And that will get you
essentially the same result, but with real world conditions
rather than generated conditions.
14:08 One quick, node set up that we need to, 
get together before we move on is a mask for both the,
14:16 ocean water and the river water
separately. Apologies
for not recording this in advance,
14:22 but all I'm doing is taking the blurred
island mask node we made previously
14:27 and putting it into the combined node. Using a subtract and setting that ratio to one.
14:34 So we're subtracting the,
ocean water from the river water. Then we're just going to adjust that
14:42 so we can clip all the excess, mask
that we don't need
14:47 until finally
we put it into one last adjustment node. And on this node we're going to use
the equalize to bring it to a full white
14:55 and a full black. So it works well as a mask. Make sure to right click
and make a portal for the end of it,
15:01 so we can use it in later graphs, but that's about it for the landscape
shaping tab.
15:07 Next we're going to move on
to the masking tab where we will create, general material masks for Unreal Engine
and for the vegetation.
15:17 Jumping on over to the masking tab. Here you can see the exports on the right
15:22 and on the left here
we have chokepoint nodes. And these nodes
connect to the previous tab
15:30 because we're not using a river mask. On the previous tab, we're not going to
be using these nodes either.
15:36 So I'm going to go ahead and remove them. This particular grass node
15:42 is actually coming
from the vegetation tab. We'll get more to that later.
15:47 And over here on the right
you can see all of our export nodes, nicely organized and in order.
15:54 These are going to be the masks
in our landscape later on in unreal. Okay.
15:59 Let's get started
and go through these nodes, individually, starting with,
the landscape checkpoint here.
16:06 I'm using a height and sunshine node in order to drive the, snow node here.
16:14 And while this is an island
that probably never has and never will have snow, I'm
going to leave this node
16:22 in just for some variance
in the landscape texturing.
16:27 And since the snow node
does affect the height map slightly, I'm going to create a separate heightmap
node there and create a portal
16:35 for use later.
16:41 Here I'm going to adjust the snow settings
just a bit. I don't think this island needs
too much snow.
16:47 As unrealistic as it already is. So I'll just be adjusting
the settings here a bit.
16:56 All right,
that looks like a good amount of snow. So let's move on to start
producing the rest of the landscape masks.
17:04 Here we have the first three masks. The slope ground A and ground
B, material masks
17:11 for the landscape and unreal. And these are simply, slope nodes
17:18 that are adjusted
to have slightly different settings at higher slopes, a different, 
rock material will be shown.
17:26 So I'm trying to emulate that by isolating certain slope values from each other.
17:33 Let's jump back to the river mask node. And here
we're going to combine with the snow.
17:39 And then finally combining again
with the topmost cliff slope node in order
17:44 to give us a zone
that emulates, the area of the landscape
17:49 that's not too steep, but flat enough to hold, loose rocks.
17:58 Let's jump down to producing our,
overall landscape normal map.
18:03 And the first node that I use generally
for this to add a little bit more grit and detail to the landscape
is the anastomosis, node.
18:13 Don't ask me, what that means, but it does produce a nice, layer of,
18:20 normalized, 
grit and variance in the landscape itself. It's not, 
entirely apparent at the one K resolution,
18:28 but it does add a little bit of variation
in grit.
18:33 After that,
we have a couple more nodes to add that last touch of detail
to the landscape.
18:39 We have the roughing node. And then finally the ground texture node
connecting to our landscape.
18:45 Normal node. And notice on our landscape normal settings
we are using the detail type.
18:52 This will allow us to apply the normal map
to the entire landscape.
18:58 It does this by averaging out
the overall slope of the landscape, and only showing the normal
on the small variations.
19:07 There within. Next up we have another node
that is actually being driven by a future,
19:16 mask in the vegetation tab. This is our tree fall and forest
19:23 texture mask, for, leaves and various
debris underneath trees.
19:32 This can be adjusted
later and is based on, the trees in the following tab.
19:39 But before moving on,
we have one more thing to take care of in the masking tab.
19:44 And that is our river and dead zone masks.
19:49 So here at the beginning,
you have the choke points again
from the previous landscape shaping tab,
19:55 passing that through a blur
and then a clip node and then finally a warp node
in order to give it a bit of variation.
20:03 And that is going to become our sand
and gravel mask. That rough edge variation
is going to help complete the look.
20:12 Then from our river mask here,
it's going to go through, quick adjustment
and blur into an erosion node.
20:19 And this erosion node is going to give
it a very naturalistic edge. And finally, from that erosion node,
we have another clipping node
20:27 that is going to become our riverbank, 
material node. And then after the same blur,
we're going to do a different clip,
20:35 with slightly higher min and max values. And that will give us our river basins.
20:41 Whether or not
you want to use any of these, material transitions is up to you
and your project.
20:47 Within the riverbank and the river basin
and the river edge, you can all be one material
if you so desire.
20:54 The last material node
that we're going to make here is very important
for the upcoming vegetation tab.
20:59 This node is an adjustment
node, named to be called, the dead zone.
21:05 And the dead zone is simply an area
where plants are not allowed to grow. For this project, it's
going to be the snow and the river basin.
21:14 But it could be, driven
by several different, combinations. If you so choose, in your own project.
21:23 Okay,
let's move on to the vegetation tab. And here at the very beginning,
you can see our two choke points again.
21:31 We have here
the dead zone that we just created again, in that includes
the snow and the, the river.
21:40 I also brought over with a choke point, the riverbed node.
21:45 We're going to be using this node
to generate the flow A and flow B vegetation masks.
21:52 And here at the very bottom you can see
an example of a common bug in Gaia 2.0.
21:58 Hopefully gets fixed in the future. Portals will every once in a while, 
get disconnected.
22:07 And then if you try to delete
and fix them, it will cause a crash. Which, you can sometimes just ignore
and then replace the portal
22:18 with what it needs to be originally. Or sometimes it will actually crash. In this case, I got lucky.
22:25 I was able to fix,
this particular vegetation mask. And this is, number 17.
22:31 This mask is for, whatever you want.
22:37 In my case, I made it a snowy tree mask. So using the snow
22:43 portal, I connected
the snow to the vegetation mask. And here you can have, snowy trees.
22:49 If you wanted to use that. Let's hop back up to the heightmap
choke point again.
22:55 And here we're going to generate our most, prosperous vegetation.
23:02 These are vegetation nodes, by the way. If you're looking for them in the,
in GUI 2.0,
23:08 but with these vegetation nodes,
we're going to produce the large trees and the small trees that cover
most of our landscape.
23:15 You can see right now
that our settings are a bit limited. The slope value is a bit too small
for the trees to grow up the edge.
23:24 So we're going to make some adjustments
to the large tree settings to make it
23:29 a lush. Forest throughout the island.
23:34 I'm going to speed up this next section here for a bit
as I adjust the settings. To get the trees just right
23:41 here, I'm double checking
to make sure that, the dead zone mask is actually working with the trees,
and it looks like it is.
23:49 So we're good there. We're just going to make the trees
a bit more dense, a bit more lush,
23:55 and dial in the settings just a bit more.
24:02 All right, moving on to the small trees. We're going to do the same thing here. I want
the small trees to be in the valley.
24:10 So again, I'm
just going to play around with settings until I get the look and feel that I want.
24:17 The trees are getting a little bit too close to the riverbed
and the snow, so I'm adding an adjustment, to the
24:27 dead zone to make it a bit more expansive,
using a blur. And then the shaper
part of the adjust node,
24:34 to expand out the dead zone in order to cut back the trees
from the edge of the water.
24:42 And we're back to adjusting the small tree
settings again. Going for the correct look and feel
24:50 and jumping back and forth between the vegetation node
and the dead zone node
24:56 to make sure that I'm cutting back,
the vegetation just the right amount from where
I don't want it.
25:04 And I jump back over here to the snow node because, I wanted to adjust
how much snow there was on the island.
25:10 There was a bit too much previously. And here we are. That's just about right.
25:17 I think everything's looking good. We can move on to the combined, tree, full node, with which we are going
to mask the landscape again
25:27 in the previous tab, we talked about it. This is the area under the trees. Will where there will be some, 
maybe some leaves or debris.
25:36 All right, let's move on to the shrubs. Same thing as before. We want to just play around
with the settings
25:43 until we get the shrubs
in the right areas. And looking the way we want.
25:53 Okay, so with shrubs, Looking good. We're going to move on to shrubs B
and adjust those so
26:01 that they are in a slightly different area
to give more biodiversity.
26:07 And we're going to adjust those settings.
26:14 And I'm going to connect to the dead zone adjustment layer
to this. Again to cut it back just a bit.
26:19 Make sure it's not in the water. And that looks good. Now we can move on to the grass masks.
26:29 You can tell right off the bat
that our flow and grass masks are going to need some adjustments.
26:36 I'm checking the river mask there, but since these vegetation
masks are simply driven by,
26:44 slope and altitude, simply adjusting
settings, will get you the desired
26:52 look eventually.
26:58 Here I'm going to connect, the adjusted dead zone mask,
27:04 to give the grass a bit more of, push back away from the water's edge.
27:10 And I'm going to apply this
to all variations of the grass masks. I'm using several different grass
27:18 masks in order to create some color
variation that is going to be driven later
27:23 on in unreal by the, RV runtime virtual texture, variation in the grass.
27:31 But this is entirely optional,
and you can ignore these, masks A
27:36 and grass mask B if you do not want
to use those variations,
27:43 give me a moment
while I adjust some settings and get those masks in proper position.
27:59 Okay, those are looking good. We can move on to the flow mask. And this is vegetation
that is going to be near.
28:07 The water's edge. And as such we're going to be using
the river mask,
28:14 brought over using a choke point node
from the masking tab in order to drive, or inhibit,
28:22 where the grass or, sorry, the flow
vegetation is going to be spawned.
28:33 And I'm realizing now that this is going to need
a bit of adjustment to make it work. Right now the river is too thin
for the vegetation to spawn,
28:44 inside and around of,
due to the resolution. So I'm going to have to expand it out
by using the riverbank node instead.
28:52 And we're going to bring that over
into the choke point, by deleting the previous portal
and adding in a new one.
28:59 Here is River Bank. And now that should be good enough
to spawn some vegetation inside of.
29:06 If we adjust the settings
just a little bit. And here I'm using the handy
29:12 blur node again to expand the edges
even more.
29:17 To give it a bit more space to spawn. Vegetation.
29:24 And again, in conjunction with that blur node,
we're going to use the shaper adjustment
29:30 on the adjustments
node to push that expansion out towards the edges.
29:38 If we increase the strength of the blur, the shaper will
then be able to expand the shape.
29:45 Further
based on the strength of that blur. This is a handy little trick
that I use, frequently
29:52 to help, increase the size of my masks.
29:58 Okay, with that mask looking good. We can now invert the mask
so that we have, space inside of the river.
30:06 To spawn the vegetation. And now, since the mask is inverted, 
that means I need to go
30:14 the opposite direction with the shaper
to push the shape the other direction.
30:20 Now it's just
a matter of adjusting the flow settings, so that the plants fit in the mask.
30:27 It's a bit of a struggle here
with the one k resolution. But with a bit of adjustments
and finagling,
30:34 we will get it to work here. I'm going to turn on, visualize data.
30:41 And that setting
allows us to easily visualize, these minute settings changes
that we're making.
30:48 You can see exactly how all these settings
are interacting with each other. You'll see here in a bit
30:55 it is a very easy to see blue, red and green mask, that adjusts according to how your inputs
31:03 are changing. For example, here,
31:09 as I start to use the dead flow setting, you can see these veins of red
coming into the green mask
31:15 showing exactly how that dead flow
is affecting the simulation. Bias and data.
31:28 Please wait just a moment. I'm going to make some adjustments. So that our flow A and flow B
masks are slightly varied and,
31:37 adding a bit of, diversity to the bank around the river.
31:46 All right. That's looking pretty good. All that work for just a little bit of vegetation,
but it's going to be worth it in the end.
31:54 This last node, the custom node,
you can take it or leave it. It's open for any, extra
32:00 variation of vegetation
that you want to add. Can be used to add snowy trees
to the snow zone like I had previously,
32:07 or just, a separate variation of trees. If you want to throw in
a different species or a different size.
32:14 That's up to you. I'm going to leave it in, but
I don't think I'm going to be using it,
32:21 this project, maybe next time, but I will fix the settings
so that it is working properly
32:28 with the island,
in case you do want to use it. All right. I'm going to use the rest of this
32:35 time here to just quickly adjust,
thickened, forests and,
32:41 small tree masks. And make sure everything is looking good. Before we move on to the final tab.
32:53 But before moving on, we're going to need to compile
the grass, texture masks.
32:59 And you can see again
that Gaia is once again giving me an error with the portals,
having blank portals.
33:06 So we're going to need to quickly
fix that. And in case you run into this
in the future, and they haven't fixed it
33:13 yet, the way to fix it is, 
just delete the portal and add it back in.
33:18 It's a bit of a waste of time, but
until they fix the bug, it's unavoidable.
33:25 So now these two combined nodes are just, adding and subtracting together the,
various grass.
33:33 Grass
masks in order to get a, combined grass,
33:38 throughout the entire island. And this will be used
later in the texturing.
33:51 And now that we have our grass, texture, we also need to account
for where the tree fall.
33:59 Will interfere
with where the grass is growing, where leaves and debris
will lay on top of the dirt.
34:05 So we're going to need to subtract,
the grass from the tree. Fall,
34:10 in order to get that area. And here again,
34:15 we're just using a variety of, blur. And then
34:22 equalize adjustment nodes in order to get a strong black
and white mask
34:29 of all the grass areas that we're going
to be using in our project.
34:36 All right. Now that all of our vegetation
and, vegetation related
34:41 material masks are created,
we can then bring them over to our export, node set up here.
34:49 And I have them all separated
with portals, just to make it a bit more clear, organized and concise.
34:56 Here I'm clicking on all of the nodes
to make sure that they're loaded and working properly.
35:03 This is just a mix of,
blur and adjustment layers in order to get a nice, strong, 
black and white mask.
35:12 So that the values translate
well into Unreal Engine. When we're spawning vegetation
using pigs and grass masks
35:21 as part of the landscape material. Here again,
we're running into the, Gaia portal bug.
35:30 So just like before,
we're going to have to delete the portal and then replace the portal.
35:35 This happens very frequently, and until they fix it, you're
probably going to have to do the same.
35:43 Unfortunately. Just give me a second
and I am going to fix all of these nodes
35:49 to make sure that our exports will work properly. Okay.
35:55 Now that our exports seem to be working,
let's head over to the very last tab texturing.
36:01 This tab isn't necessary for the export, but it is nice as a, checkpoint to see
36:08 that everything is working properly
and your landscape looks good. Before you export everything
to Unreal Engine.
36:16 The basic premise of this texturing tab
is to take all the masks from the previous tabs
and give them some color,
36:24 so you see how they all work together
and hopefully how they look in unreal.
36:29 So here at the beginning of the graph, you see a texture base
node followed by three set maps.
36:36 This is to give the landscape
a basic coloration. Before we start to
add in the additional masks,
36:42 we're using, a couple slope and flow nodes in order to, 
naturally divide
36:49 the colors and combine them
with these two separate combine nodes.
36:54 The next combined node is for the grass. And for that particular combined node,
we're going
37:00 to have to add in our main grass mask. So let's just click on the node here.
37:06 Go to portal. Delete out the mask
that guy has glitched out. And let's add in that main grass
mask at the bottom.
37:15 Be careful of the icons. You don't want to use the foliage
icon as denoted by the tree.
37:20 You want to use. The one here at the bottom.
37:26 All right. The next mask is the grass a mask. So again, let's, go to manage portal,
delete out the old mask there,
37:35 and let's add
in our grass a here at the bottom.
37:43 And you can
see the color starting to come through. And that delineation in the grass color
showing up.
37:50 Same thing as before for grass B.
37:58 All right. That's looking pretty good. And if at any time you want to change these colors
and adjust them to your, preference,
38:05 just click on the set Saturation
map node at the bottom and you can adjust the colors there or use
completely different
38:11 colors. I'm going to go ahead
and speed through these next few nodes.
38:19 Starting with the sand and rock node. Same as before.
38:24 Changing out the mask
using the manage portals. Next we have the snow node
38:31 or the snow mask.
38:37 Followed by the small tree mask.
38:46 Naturally. Followed by the large tree mask. And importantly,
these two nodes that are floating above
38:53 the small and large tree
masks are the underlay nodes. And this is to, project
the trees back onto the landscape.
39:03 And you can use, any node as an underlay by simply right clicking on it
and selecting the option use as underlay.
39:14 So now we have a feel for how dense, the trees are in the landscape
and how they feel in general.
39:21 I think I need to go back
and adjust the blending a little bit, so that the trees have proper coloration.
39:28 So that's what I'm going to do here
in the combined node
39:33 and change it over to blend
and adjust the ratio until, the trees have a nice coloration
39:39 to them. Okay.
39:44 Things are looking pretty good,
but I think I went a little bit too extreme with the, difference
in coloration between our greens here.
39:51 So I think really quickly
I'm going to go back to my, set maps, saturation map nodes,
39:58 and I'm going to adjust these colors
to be a little bit less vibrant.
40:14 Okay, that's looking pretty good. Let's move on to the last part here. The water.
40:20 So we're going to do the oceans
and the rivers next.
40:26 The water coloration is a bit special since we want it to look, realistic
and have some, gradients applied.
40:33 We're going to be using the clutter
instead of, the normal set map in order to get our coloration.
40:41 So here in the open space,
I'm going to actually add a soil node. And this will give us, 
the gradient that we want
40:48 on the, edges of the island. So on the soil mask here,
40:53 we are going to use a portal to connect, the island mask node that we made
41:00 way back in the masking tab.
41:06 And now we're just going to adjust the amount in bias
until we have a nice gradient. That will serve as a, gradient
between the shore
41:15 and the deep blue sea. I couldn't
41:20 quite get it as strong as I wanted using
just the soil node. So we're going to add an adjustment node
41:27 and then really beef up that gradient
so that it's, pretty stark. And then invert the gradient,
41:34 so that the coloration goes from white to black instead of black to white.
41:44 But a simple stark gradient won't have quite enough variation
for my liking.
41:50 To make it a bit more ocean
like, with the foam and the shadows on the waves,
let's add in a texturize or node.
41:58 And then, using a portal, mask it off with the island mask.
42:04 And that will give us, a nice, variation.
42:10 I'm going to play around here
with the texture as your type. And then, the factor secondary
42:16 and the seed values until I get a nice, 
gradient and variation
42:22 in the water surface. Okay. We have our base texture
ready for the water.
42:30 So before we move on, let's combine
the two together using a, combine node
and putting it to power.
42:39 And then let's adjust the ratio
until we get a mix of the two that we like.
42:48 Now just like with the river color,
we're going to be using a cluster node
42:54 to, give this water a nice blue gradient.
43:01 So for the deepest part of the ocean, I'm going to choose a dark navy.
43:07 And the shoreline
will get a light teal color.
43:15 And after playing around with the colors for a little bit,
I realize I need a bit more variation.
43:21 So instead of using a cluster node,
I actually think I'm going to use another saturation map set map node.
43:30 And we're going to go through the library
of colors here and choose a blue gradient
that has that shoreline variation
43:37 that we're looking for.
43:44 Now let's use another combine node and blend these two, gradient variations together
43:53 in order to get a mix
that fits our purposes.
43:59 Okay, that's looking pretty good. As a tropical blue,
let's add a combine node
44:04 and combine this with the landscape
that we've textured already.
44:22 Just going to darken up the ocean a little bit more. Just to give it a bit more depth.
44:31 And that's looking pretty good. Let's move on next to exporting our masks
44:38 and getting everything prepped
and prepared for Unreal Engine.
44:45 To start exporting,
let's hop back over to our masking tab. And over on the far right,
nice and organized.
44:51 We have all of our exports here. A nice part of Gaia two
is that we have a new
44:58 special node specifically for unreal. It's called the unreal node.
45:03 And this will export
all of our masks at the resolution.
45:09 Perfect for unreal Engine landscapes. Before exporting. It's good practice
to click through all of your export nodes
45:17 and make sure that things are all loading
properly, especially if you're like me, you're using portals
to keep your graphs organized.
45:24 Sometimes those links
can get disconnected. So, make sure to double check
before you start your export.
45:31 If you need to make
any additional exports, just right click and create a new unreal node and connect
whatever mask you've created to that.
45:41 Before exporting, we should take a quick
look at our build settings. Click on project in the top dropdown.
45:53 And on the left hand side
here, under the build settings, we are interested
in the build destination.
46:00 By default it will put all of your builds
where your project file is saved, but you can adjust, exactly what folder
you want to send it to.
46:08 Here. Once all your nodes are error free
and you have your build destination set,
46:15 go ahead and go back up to project
and click Build and Export and the top.
46:21 This will give you a little dialog, 
alerting you that you're about to start the build
and double check your build resolution.
46:28 We could build it
at a slightly higher resolution, but since we are using the free version,
we are limited to 1024 by 1024.
46:36 But for our purposes,
that should be just fine. Go ahead and click Start Build
and wait for the build to finish.
46:44 What's nice about Gaia two is that builds
don't take nearly as long as they used to,
so you won't have to wait too long.
46:53 And there you go. Once your build is finished, all of your images will be exported
to the directory that you set earlier.
46:60 And if everything with the build
went well, you should see all of your masks in PNG format
47:07 as well as your heightmap in your 16, which is the preferred format
for grayscale
47:16 images to be used for height maps
in Unreal Engine, as well as some Json files at the end
named Definition and Report
47:24 in case you need to debug any issues
with the build. If there were any. But fortunately for me
it looks like everything went through.
47:32 So let's head on over to Unreal Engine
and build our landscape.
47:39 Okay, let's hop over to unreal. If you've picked up my files on Gumroad,
go ahead and open the gear to unreal scene.
47:48 If you're doing this from scratch,
you can go ahead and make a brand new project. We'll be going over
quite a bit of the workflow here.
47:56 But there are certain parts of it
that we won't be touching on, such as, in-depth tutorial on the landscape
material
48:04 and, super in-depth tutorial
on how the picture gets put together. But we're going to go over broad strokes,
48:11 so you should be able to use this tutorial
in conjunction with a couple others
to get something pretty similar.
48:20 All right. When you first open up the file,
if you've watched the first tutorial that I made, 
this will probably look somewhat familiar.
48:28 It's a previous map that we made, but for this tutorial we're
going to start with a brand new level.
48:34 So right click on your content browser
and let's make a new level. Go ahead and name that level
whatever you want
48:41 and save it. Before we move on though,
let's go ahead and jump over to the
48:48 outliner and let's copy
all of our sky items here.
48:53 It will save us a lot of time
setting up our new level. If we can just copy and paste these over.
48:59 And this is just a simple set up of sky,
atmosphere, direct light, etc. etc.. Pretty standard.
49:08 Okay, from here
we're ready to import our landscape. So go over to the top landscape tab
49:16 and go to import from file at the top.
49:21 And here we can import our heightmap file
that we exported from Gaia previously.
49:27 So go ahead and select our Rs 16 file labeled heightmap.
49:32 And let's import that right now you'll notice that it's a bit out of scale
based on our wireframe preview here.
49:39 So let's mess
around with our scale values. And in fact we already know what scale
we need to be using.
49:46 We set it up previously with our, 
Gaia file set up.
49:51 So let's take a quick
look back at our Gaia build settings in regions,
and we'll see right there in the middle.
49:58 Our height scale ratio is 0.09. We're going to be using this ratio
in unreal as well.
50:06 So hopping back to unreal,
if we simply put 100 by 100 by nine,
50:11 our landscape is going to be pretty small because of the restraints
on the resolution.
50:17 So we're actually going to the size just to give our
game a large open world feel.
50:25 So here I'm going to go with a thousand by 1000 by 90. And I think that's a good size for
50:33 the rest of the settings down
below are automatically set by the imported heightmap file. So if they're ever changed,
go ahead and click Fit to Data
50:41 to change them back to the default. And I think we're ready to go. Go ahead click import and our landscape
will pop into the editor.
50:51 And just taking a quick look around our height seems just right. But we'll notice on the edge
that we have a wall.
50:59 And this is a common issue
with, tiling in Unreal Engine. But luckily this is a quick fix.
51:06 Just take out your flatten sculpt, tool, turn the strength all the way up
and the size all the way up,
51:13 and let's just move around the perimeter
and flatten that back out.
51:19 This could be a factor of, the AR 16 file type
and how it tiles in unreal.
51:27 I imagine that the tiling is causing a very thin white band,
51:32 to appear at the edge of the image, and unreal is reading that white edge
51:38 as a, high point in the heightmap and thus creating this wall.
51:46 If we were using a normal landscape
that wasn't, water and ocean in this area and thusly,
51:54 completely flat and completely low, then we might not have this issue
51:59 or it could be a factor of the AR
16 file type. But regardless, we got it all cleaned up
52:05 and we're good to go. Before
52:11 continuing any further
with the landscaping tab, we need to add a material
to our landscape.
52:17 So go ahead and go over to the
landscape Materials folder. And in here
52:22 we have a master material
and a material instance. You can go ahead and create a new instance
52:29 of the landscape master material or an instance of the existing instance.
52:37 And that will give you the settings
that are used on the, previous level.
52:42 And those are a bit more refined
and will take a little less work.
52:49 All right. Let's hop back over
to the landscaping tab. You'll see here soon
that our landscape is going to turn black.
52:55 That's okay. We will fix that in a bit. But first thing we need to do
is get some layers on our landscape.
53:03 So go ahead and click
on the paint tab at the top. And if you go all the way to the bottom
under the layers dropdown
53:10 you'll see an option called Create Layers
from Assigned Materials.
53:16 And to explain where that comes from,
let's go ahead and open up our master material.
53:21 And don't get too intimidated at first. Essentially all this is is textures
53:27 on the left with some nodes
for creating variation and tiling, and they're all connected
to this very important
53:35 node called landscape layer blend. The landscape
layer blend node is essentially in charge
53:42 of tracking and storing how and where all of the materials on the
landscape are placed, and whether or not
53:50 they are blended into each other
or simply placed on top of each other.
53:55 As soon as we click the button,
create layers from assigned materials. All of those layers
that we have set up inside
54:02 the material will show up here. And if you click on the drop down
for each of these, you'll see that
54:10 we already have a landscape layer
associated with each of these. This is something
that unreal will generate.
54:17 And it was generated
previously for the previous landscape. You can see it in the landscape,
shared assets.
54:24 There. But for example,
if you have a new material or a new layer
54:31 and you need to generate a new landscape
layer info, just click the plus icon
54:37 and then choose White
Blended Layer or Nonwhite Blended Layer. The white
54:43 blended layer will, as the name
implies, blend, and the nonwhite blended layer will simply stack up.
54:52 But we don't need that for now. Let's delete that. And now we need to jump back
over to our landscape and adjust our RV's
55:01 so we can actually see the materials
that we're adding. Routes or runtime virtual textures
55:09 are basically unreal way of on demand at runtime.
55:15 Creating textual data
over an entire landscape, essentially making
55:22 a decal that pastes over
the entire landscape that you can use to determine grass coloration
55:29 or blending plants
and rocks into the landscape. And it is super useful for creating,
55:35 homogeneous landscapes
that look visually appealing. So we're going to do that here.
55:41 But first things first,
you need to activate it for your project. If you haven't already
in your project settings.
55:50 So let's quickly
go to our project settings and type into the top
search, Virtual Texture.
55:56 And then go ahead and select the checkbox
enable Virtual Texture Support.
56:01 And after that
you probably need to restart your editor. But then virtual textures
should be working.
56:08 Next thing we need to do
is add the virtual texture assets to our map itself.
56:14 So if you haven't already, go ahead and
open window and then make sure you have
56:20 the Police actors window open. And from this window
56:27 go ahead and search for virtual texture and the runtime
virtual texture volume should come up.
56:34 Go ahead and drag and drop two of those into your map.
56:41 Just to keep things organized, I'm going to put them in
a folder named RV. And then let's change
the names of both of these to RV.
56:51 Underscore height, and then the second one to RV
56:56 underscore color. These correspond
to the rendered texture types
57:02 that are going to be associated with them.
57:07 If you go back to your content browser,
you can right click and create a new texture
called Runtime Virtual Texture.
57:15 If you're making these from scratch,
you'll need to set the virtual texture content appropriately. Luckily, I have these made already,
so go ahead and copy these settings.
57:27 Here are the settings for RV color.
57:32 And here are my settings for world height RV height.
57:37 Since we already have these set up, let's just use the ones we already have
57:42 for RV color. Go ahead and drag and drop the RV
color named Runtime Virtual Texture,
57:49 and then on the bounds Align Actor, make sure you select the landscape
and click Set Bounds.
57:57 After that,
we're going to do the same for RV height. Drag and drop it into the RV height volume
58:04 bounds align factor
to the landscape and set bounds again. We are almost there.
Just one more setting.
58:10 There are still RV settings
to do in the landscape actor itself, so go ahead and click on landscape
and scroll all the way down
58:20 until you see draw in virtual textures. There's two boxes here and as you guessed,
58:25 one is for color
and the other is for height. And just like that,
we can finally see our landscape material.
58:33 I'm going to hop back over to landscape
mode and quickly delete out, some of the material that we have saved
already, and we'll start from scratch.
58:42 So just go over to paint and right
click on the very first layer and fill layer.
58:50 All right. We're finally ready to start applying
the masks that we exported from Gaia.
58:55 So back in landscape
mode head over to the manage tab. And here underneath the layers dropdown
you can see that we have all of our
59:04 landscape layers ready to accept our masks
that we exported from Gaia.
59:10 So by clicking on these three little dots
you can import the masks first,
starting with the base rock layer
59:17 followed by a ground, a and then ground B.
59:22 I like to split these up into three
masks at a time. If you try to import too much.
59:28 It could cause a crash due to how much, the shader needs to compile.
59:35 So I like to take things a little slow. Once you have the three masks,
59:41 brought in and linked, we're going to scroll to the bottom
59:48 and click the import button. And just like that, we have the first
59:55 look at how our landscape
is going to be textured. Looking pretty good so far.
60:01 Let's go ahead and continue
importing our masks.
60:12 Clicking on import. Yeah. And you can see how all of these masks
layer on top of one another,
60:20 to create, varied
and interesting landscape material.
60:28 Next we have lake snow and sand.
60:40 Well that's preparing. I'm going to go ahead
and bring in Riverbank and Riverbed
60:46 and prepare them for import.
60:53 Yeah, everything's looking good there. Go ahead and import the last two.
61:02 Yeah. Looking good.
61:14 Let's
go ahead and hop back into landscape mode and import our last, 
nonwhite blended masks.
61:21 Grass a and grasp. And essentially nonwhite
blended masks will sit directly
61:26 on top of our existing material and will not have any fade or blending.
61:33 It will just be a direct stamp,
as it were. And we're going to use these
to color the grass and create
61:40 a bit more variety and variegation.
61:49 You can see with the shaders now compiled that the coloration is,
61:54 different, a bit brighter in patches
and then a bit darker. And others,
yeah, I think it adds a bit of,
62:03 variety and visual interest
that really helps out landscapes.
62:15 Zooming in on the face of the rocks here,
I can tell that the tiling
62:20 needs a bit of work,
both with near and far tiling. This is usually at the time in the project
62:26 when I would spend some time
getting all these values. Really, tuned in.
62:33 But I don't want to waste too much of your
time going through all of these values, so I'm just going to skip ahead to where, 
the material
62:42 is looking correct and good. So let's go ahead and skip there.
62:50 All right. Now that the material tiling
is looking good throughout the landscape, we can move on.
62:56 One thing we haven't touched yet
is actually bringing in our masks from Gaia to replace the ones
that are inside the material themselves.
63:05 You can see that the landscape normal map from a previous
build is still in the material, so we need to replace those
with our new build.
63:15 So next thing we need to do
is bring in our, masks from Gaia.
63:20 Let's go ahead and make a new folder. I'm going to name it Gaia build two. And then
63:26 from the directory I'm just going to drag
and drop all of the masks that we exported from Gaia previously.
63:33 Okay. Go ahead and save your new import. And before we move on
to plugging it into the material,
63:40 we need to make one big change
to all of these. So select them.
63:45 All right click and go to Asset Actions. And then from there
go to Edit Selection in Property Matrix.
63:53 And this will allow you to make changes
to all of your selections at once. Saving a bit of time
64:00 inside the property matrix. We're going to be looking for padding.
64:06 And we want to change that to stretch to power of two. This is important for how,
64:14 the texture tiling is going to work
within the PCGs later on. So taking care of it now
will fix any future bugs.
64:23 So clicking on one of these, I'm
just going to double check that stretch to the power of two is on. And the type is for UI
64:31 and we're good to go. Let's
go ahead and open up our material again. And we're going to search for normal.
64:37 And we're going to replace the landscape
normal map with our newly generated one.
64:43 Now you can see those wrinkles
in the landscape are gone. And in fact, we have sort of a wave,
64:50 normal around the edge of the island.
64:55 And the normals are looking much nicer. One thing we're missing
still is the grass maps.
65:01 So let's just double check
that our foliage maps are properly replaced.
65:07 And I can see I can get a better, search if I type in foliage
to see all of the maps.
65:13 And in fact, yes, we do need to replace
all of these textures. So go ahead and activate those.
65:20 And then we're going to drag
and drop our new main grass grass A, grass B
65:27 and dead
zone textures into the existing slots.
65:43 All right. Now that those are in, you can expect, grass to start
appearing on your landscape.
65:49 However, I have noticed that
in recent versions of Unreal Engine, the grass maps
do not automatically build as frequently.
65:58 So there are a couple fixes
that you can run. First thing, you should run the console
command grass dot enable,
66:07 and then space one to make sure that grass
is actually enabled on your project.
66:12 I'm going to click the output log
to confirm. Let's go back up to build and build grass
maps only.
66:20 And if you check the output log
and there's no errors popping up, that means that the grass
is properly building.
66:26 But yet we're still don't see it. So one thing I want to try
is to flush the cache,
66:32 just to double check. And again yes, cache is flushed.
66:39 Let's try building one more time. And if the grass still doesn't show up,
66:45 you probably just have to reopen your level.
66:52 Here in five times speed. I'm going to try a couple more things
that end up not working. But
66:60 such is the way of bug fixing.
67:09 Until finally, just save and reopen and there we go.
67:14 Grass is here. Sometimes the simplest answer is the best.
67:24 Here I'm going to do a quick fly around
to check that the edge of the grass is properly stopping at the edge
of the grass material on the landscape,
67:32 and it's looking pretty good.
67:38 Let's have a quick
look at how grass maps are working inside of our landscape material.
67:46 Up here at the top in the green box,
we have the texture sample nodes that hold the Gaia masks
that we imported previously.
67:55 And over just to the left, we have our dead zone
68:02 connected to the UVs, which is coming from our landscapes,
landscape coordinates, node.
68:07 Very important value here. The mapping scale is set to 1009.
68:13 And this reflects the resolution of our, mask images and our height map.
68:20 If you were exporting from Gaia
at a higher resolution than 1009 by 1009,
make sure that the mapping scale
68:29 inside of your landscape coordinates,
matches that resolution size.
68:34 From here, you can see that our UVs are rerouted to our dead
zone mask, and then from there,
68:40 rerouted to the dead zone
within our grasp mask calculations.
68:46 Here we also have a switch
to turn on and off the grass if we want. And the very last node is our landscape
grass node.
68:55 Inside that node
you can select your grass type and take a look at the types there.
69:01 Within. Here you can change the static mesh and the materials.
69:09 We'll take a quick look at the RV settings of the grass material.
69:14 You can see if you raise the right
blend amount, the grass will move away
69:20 from the landscape, color
and more into its own material color. And the closer that number gets to zero,
the more the grass will
69:28 blend into the landscape.
69:37 Now that we have the land looking
pretty good, I want to spend some time and shift
our focus towards making the island
69:43 look more like, well, an island. The first step is to go to your plugins
69:49 and turn on Unreal Engine's
experimental water plugin. It will give you a warning
about experimental diversion
69:56 and ask you to restart your project.
70:03 You may have to wait a little bit for the shaders to recompile.
70:10 Once back in, we want to head over to the Place
Actors window. Let's search for water
70:17 and we're going to go with water body
ocean.
70:22 To put it into the project, simply drag and drop from the place actors
into the editor.
70:28 And again
there's going to be a bit more compiling. But once it's ready, you'll notice that
your landscape will go completely flat.
70:39 Don't worry
though, it's just a quick setting fix to get it back to normal,
simply click on Water
70:44 Body ocean. Scroll down until you see the checkbox
effects landscape and uncheck
70:55 when your heightmap
should pop back to normal.
71:05 Give it a bit more time for your shaders to compile,
and the water should suddenly appear.
71:11 You'll notice that the water
might be a little bit too high. Simply reselect the water body ocean
and drag it down on the z axis
71:19 until it matches up with your landscape.
71:30 Okay, that's looking pretty good. Next thing I always do
when using an Unreal Engine plugin
71:36 is that any material
that an object from the plugin uses should probably be copied into the content
browser.
71:46 This is to prevent you
from overwriting any engine content and possibly messing up the plugin
and having to reinstall later on.
71:55 So what I'm going to do
is select the material from the ocean, and I'm going to copy
it into our Gaia to Unreal.
72:05 Directory. I'm going to go down a little further and also make a copy of the water
material.
72:18 All right. Now with our new copies, we are safe to change
any of the material instance settings
72:24 and get the color to be a bit less fluorescent.
72:53 Okay, now that our water is looking good,
we can move on to our foliage. PCGs.
73:01 Because these pcgg files here
already have settings for a different level,
we need to quickly make a new copy.
73:09 And the best way to do that
without having to replace any references manually is to use an advanced copy.
73:18 So let's first make a new folder. I'm going to name this version two.
73:27 And then we're going to select
all three of these files. Drag it in and select Advanced Copy. Here.
73:45 I want to quickly rename these files to make sure we don't confuse them
with the previous version.
73:51 So I'm going to change forest to island. And I will do the same for the,
73:57 PCG within the blueprint as well.
74:04 Quickly scroll down and double check
that the reference was in fact updated properly
and it looks good.
74:12 The reason we're using a blueprint to hold
the PCG is twofold. One, it allows us to store parameters
that can be easily changed later
74:20 with the use of a structure
that is added in separately, and two allows us to also insert
some tools, to quickly adjust
74:30 the PCG settings such as the box size in which the PCG operates within.
74:37 So in order to use this blueprint,
all you need to do is drag it into the map. And then on the editor window
to the right here
74:45 there is a button called Set
Bounds landscape. And this is the box
I was referring to earlier.
74:51 It allows us to quickly
set the bounds of where the PCG operates. This is important because the masks we have exported from
Gaia are a very specific size,
75:01 and they need to stretch
perfectly over the landscape. So our foliage is placed
exactly where we want it to be.
75:08 The first feature of the PCG that I put
together is definitely experimental and not for production,
more for just visualization,
75:15 but it frustrated me that we couldn't
get, rivers from Gaia
into unreal in a quick and easy way.
75:22 So I set up a spawn water system that spawns a slightly bent plane
75:29 with normals that are completely vertical, and if you 3D model,
you'll understand what that means.
75:35 But I'll throw a graphic up on screen
here to better explain. It definitely doesn't produce,
75:42 perfect results, but for visualization
purposes, I think it works pretty well.
75:48 Let's take a quick look at how the PCG graph itself is structured.
75:54 So to start with placing the water,
we are sampling the landscape data
within the bounds of the mask.
76:01 We exported from Gaia. And if we take a quick
look at the image mask itself,
76:07 you can see that
we're using the oh six riverbank mask. But it's from the previous build.
76:12 So we should go ahead and replace that
with our new build. And you can see already
that our river is placed,
76:19 more properly in the landscape.
76:25 Here, I'm just going to pan a little bit
through the rest of the graph. The setup itself is, is pretty simple.
76:32 You use a lot of these nodes again
and again when sampling, landscape in order to, spawn static meshes.
76:39 There is one node
here, though in particular, I want to make quick mention
of the transform points node.
76:45 We are injecting it with the, property
water level. And what's nice about these properties
is that we can control them
76:53 from the blueprint
rather than directly in the pcgg. So this is how we're going to offset
the water level
76:60 on the z axis in order to get it at
the, the level that we need.
77:06 All right. A little further on at the end of our graph,
finally, we have the static mesh spawner.
77:12 And inside of that spawner we have the water plane
that we talked about previously.
77:17 Again, this is just a slightly bent sloped
plane that can stack on top of itself
77:22 and has completely vertical normals
so that the water seems flat, but can actually travel
slightly downwards and upwards.
77:31 If we take a quick look though,
you can see that the water is a bit high. So we're going to adjust,
that previously mentioned water level
77:39 until it fits with our landscape.
77:47 All right. The water level seems pretty good,
but the color is definitely off. So we need to take the material
77:55 from the ocean
and reapply it to our water plane.
78:00 And it seems I chose the wrong material. I need to go back
and choose the other one.
78:08 All right, we're getting closer. But I think we still need to adjust
the absorption and scattering, that we did in the previous material.
78:16 So I'm just going to do that now. All right. Our rivers are looking pretty good.
78:22 Again, it's not a perfect system
by any means. It's just for a quick visualization.
78:27 But I think the stacked, bent planes
do a pretty good job of showcasing the river
without much effort.
78:36 If you wanted to spend a bit more time
and get a more accurate result, I do recommend using Unreal Engines
water tools.
78:42 The River spline does a pretty good job
and is a bit more believable.
78:49 Before we move on to the PCBs, there's one important upgrade to this new workflow
that I wanted to point out,
78:55 and that was the issue with our previous
workflow using only grass masks.
79:01 With grass masks,
we can't have any collision, so its usefulness in a game is, 
slightly limited.
79:08 More for visualization, if anything. But now with PCGs, it's easy
to add collision to any of your assets,
79:15 and they will spawn,
with the pcgg as normal. So now you can have collision
on your assets in addition to the,
79:24 procedurally generated distribution. So welcome back from that brief interruption.
79:30 Now that we have the water squared away, let's move on to the main assets
of our island.
79:36 Just like previously with our water. We need to replace the mask that's inside
of our get texture data node.
79:47 And all of these spawners are set up
similar that, these masks feed
into the landscape sampler.
79:54 So we can get points from, Gaia's output. So I'm just going to put the large tree
mask into
80:03 the slot here and save. And don't worry
if things aren't spawning right away.
80:09 I have all these on switches
so we can work on them individually
without overloading the PCG system.
80:16 And here we are. You can see the placeholder trees. These are just, low poly placeholders,
80:23 waiting to be replaced
with some higher quality assets.
80:28 I want to take another quick
look at the mask and double check
that our settings are correct,
80:33 that we are
in fact using stretch to the power of two. And if I were to turn that off
and to recompute the pcgg, you'll see
80:40 how our assets begin to misalign with the material mask on the landscape.
80:49 So let's change that padding back to stretch the power of two save.
80:54 And hopefully our assets will jump back
to where they need to be.
81:03 Okay, let's open up our pcgg again and take a look at how these small trees
work here.
81:10 So again, just like before,
we have our Get Texture data node with our mask connected to the surface
sampler down below.
81:18 And we need to replace the mask yet again with our new Gaia build.
81:37 Oh, accidentally zoomed too far out there. And now we just need to click the checkbox
to turn on small trees.
81:45 And there they are. Looking pretty good.
81:53 You can see here that our representation of the river
is not perfect by any means. So I'm just going to lower
that a little bit further
82:01 and try to hide that ugly edge.
82:06 Yeah, that's a bit better. If you ever run into a similar issue
that bothers you,
82:13 you could always go into the landscape
mode and do a bit of sculpting around the edge of the river to raise up
that part of the landscape and hide
82:21 that ugly edge of the, river. Static meshes.
82:28 Well, let's go into fast forward mode here for a little bit,
and let's put all of our Gaia build masks into the corresponding
get texture data
82:37 nodes.
82:46 With all the new masks in place, all we need to do is click the checkboxes
and turn all of our PCGs on.
82:53 You can see with each one
some new placeholder assets appear.
82:58 There are our shrub assets. They're just little cubes. But again later on
we're going to replace these with high
83:04 quality assets and make this,
more believable environment.
83:16 Here I'm noticing
that our, bushes are actually spawning. Our shrubs are spawning on
top of one another.
83:22 And this is probably because they have
the exact same seed values. So I'm just going to quickly jump
into the settings.
83:28 And we're going to change the seed
value of the shrubs just so that the have
a more random assortment.
83:44 Okay. Things are looking pretty good. Next, I want to turn on the rock layer
and take a look at how those are spawning.
83:52 So let's jump
back over and click the checkbox. Yeah there they are.
83:58 Sort of scattered
throughout the landscape. You'll notice that the rock locations
aren't restricted by the water.
84:06 And that's okay. That's how we had it masked. And if we turn on the flow,
you'll see that the flow as well,
84:13 follows the riverbank, but also, depending on the location,
will step into the river as well.
84:21 These can be, things like reeds or, lotus
84:27 stuff that likes water. Let's take a quick look at the pig graph
and how it works on the inside.
84:35 Again, it's not super, complicated, but let's look at the beginning here
with the property.
84:40 Spawn tree is linked to a selection node. This is the easiest way
that I'm aware of to be able
84:48 to turn on and off parts of a pig graph
within the editor.
84:54 This connects directly to a different node that is driven by the dead zone.
84:59 Another mask that we exported from Gaia. And this is just a way to ensure that,
85:05 none of the plants or assets
that are spawned will be within this
quote unquote, dead area.
85:14 Let's quickly
turn on debug and show exactly what the pig is computing with this.
85:20 And you can see that
it's actually our guy, a mask
just sort of blanketing the landscape.
85:29 If we go on to our density filter,
you'll see that the edges that were black
were then filtered out.
85:35 And we have just the strongest
part of the mask being used.
85:40 If we go to the next
the self pruning node, you'll see that those tons and tons of points
that were really close together
85:47 are pruned based on a set size,
so that none of our assets are too close to each other and thus
possibly clipping into one another.
85:56 Next, we're using a projection node
to make sure that none of our points are floating above the landscape,
and that they are aligned
86:03 with the normal of the surface. With some assets,
we will want to keep that surface normal.
86:08 But for trees in particular,
we're going to use a transform points node in order to
make those stand straight up
86:16 so that the trees grow more vertically and aren't, positioned sideways.
86:22 Since we've moved the points around
just a little bit, we're doing another check,
against the difference,
86:28 to make sure that none of our points
are within the dead zone yet again,
86:33 let's take a quick look at our dead zone, because I think I forgot
to replace the texture data for that.
86:39 So let's do that quickly. That should have some big changes
on the landscape.
86:47 And yes,
we're getting a lot more trees now that's looking like,
the output we got from Gaia.
86:55 That's good. Before I talk about the last three nodes on the pig graph there,
it segues
87:02 really well into our next, task,
which is to replace all these placeholder
87:08 assets with some good
looking high fidelity assets. So let's jump
87:13 back into our blueprint
to see how these assets are accessed in the blueprint, by use of parameters.
87:23 So if we click on the Pcgg instance
within the graph and scroll down, you should see a dropdown menu
called parameters override.
87:31 And if you open up all of these carrots,
you can see where all of our assets
that are currently being used are stored.
87:38 So let's jump back over to the graph and
I'll show you exactly how this is set up. In order to utilize a parameter.
87:44 First we need to make one. So go over to the right
to your graph settings and create a new parameter
by clicking the plus icon.
87:52 And then we need to switch this over
to a static mesh parameter. I should note
that it could also be a foliage instance,
87:59 but in this case I'm using static meshes. So now we can drag and drop
any static mesh
88:07 into this parameter and also rename it.
88:20 We don't yet have access to it
because we haven't saved in compiled. But once we do, should be able to right
click
88:26 on your graph
and search for your new parameter. And now you have access to that parameter
88:32 both inside the PCG graph and the attached blueprint.
88:40 I'm going to go ahead and delete the new parameter
because we won't be needing it.
88:48 Let's talk about the next node
match and set attributes. This node communicates
between the Pcgg and the blueprint graph
88:55 that any changes in the static mesh
selection within the blueprint should be reflected in the following node.
89:02 Here the static mesh spawner. One important note make sure that
the attribute name here matches exactly,
89:10 otherwise the graph will throw up an error
when you compile. Additionally,
make sure that your mesh selector type
89:16 is set to PCG mesh Selector by attribute. Let's jump back over to the blueprint
and let's change out the large tree mesh
89:24 so we can see this in action
to quickly accrue a variety of assets. I'm going to be using the sample project
Electric Dreams.
89:32 Feel free to use any asset packs
that you already have, but this one is a very good free option
89:38 that's available on the Unreal Engine
website or on facebook.com.
89:45 Let's open up Electric Dreams and take a quick
look at the folder structure. When merging two projects together,
it's always important
89:52 to take note of how the folders are
laid out, because the exact same folder with the exact same
path will be copied over to your project.
90:01 Looks like all the assets
we could ever want are within the Megascans folder 3D plants.
90:07 So I'm just going to right
click on the Megascans folder and then go up to migrate.
90:16 Unreal engine will then throw a list up showing you all the dependencies
that you are about to migrate over.
90:23 If everything looks all right to you,
go ahead and click okay.
90:28 I will note that because we are doing such a huge import, I made a copy of our project
because from here on out,
90:36 the project file
size is going to be much, much larger. So if anything breaks, it's always nice
to have a place to go back to.
90:46 Okay. With our new assets successfully imported,
we can go ahead and start placing them into our blueprint.
91:00 I'm going to be using the European hornbeam
as the main tree in this file. So let's go ahead and just drag one in
and see how it looks.
91:23 You can see that even after changing the static mesh
parameter, the pcgg is a bit stubborn to change
even when forcing the regeneration.
91:33 I'm going to make a quick function
to force regeneration in editor
and see if that works.
91:54 Dragging off of the function input, we're going to use the flush PC GCash.
92:01 And this node is somewhat
self-explanatory. Then I'll also do a notify properties
changed from blueprint.
92:09 I'm not exactly sure
how that's supposed to help, but sometimes it does,
so I'm just going to add it in anyways.
92:15 And then the last node we need
is the refresh PCG runtime component.
92:22 I'm noticing
that the refresh PCG component, actually has the flush cache option.
92:28 So I'm going to delete the first node
and then just check that one and that should take care of
both of those things.
92:34 One last important step is to make sure
that it's possible to call an editor that will give us a button
that we can actually click on.
92:49 Unfortunately, this, function
didn't actually end up helping us out, but it is a useful thing
to keep anyway, so
92:55 I thought I'd keep it in the tutorial instead. I guess what is necessary
in order to refresh the cache
93:04 of these static meshes in the PCG graph
is to just delete the PCG and to place it back into the level.
93:22 We will need to reset our water settings and put it back to the level
we had previously.
93:27 But as soon as we turn on large trees,
you can see that they actually pop in. So we're good to go there.
93:33 We are having some issue though
with the shader, so let's take a quick look at the material. Anytime you migrate Megascans assets
they have a tendency to break.
93:42 So this is pretty common. But I think I know a quick fix.
93:49 Let's open up the static asset and take a quick
look at the materials.
93:56 Here we have the material instance and it is noting something
about requiring non virtual textures.
94:01 So let's go to the parent.
94:08 Right away I notice that this substrate node here at the end
is probably what our issue is.
94:14 I don't know if our project settings
are set up to use substrate. So we're just going to go ahead
and delete that node and
94:21 reconnect, 
the material attributes to the output.
94:31 All right. Looks
like that fixed up a lot of our issue. And since it was the master material,
it seems like all the other plants here
94:39 also have been fixed. But let's just open one up and double
check. Yeah, materials are looking good.
94:46 So that seems to be the fix for now. Let's go ahead and dive back
into the blueprint, and we'll fill out
94:52 the rest of the static meshes
with some more of our assets here.
94:57 So I'm just going to click on the plus
icon, add a bunch more array objects and let's go and add
in some more of these trees.
95:05 So we get a nice variety in the landscape. I don't know if I mentioned this earlier,
but this is a really nice
95:12 consequence
of using parameters inside the blueprint instead of, 
directly using static mesh spawners
95:18 is that it's really quick
to add an entire array of varying assets.
95:25 I think I want to also add in some tree stumps and various other,
static meshes into this.
95:31 So I'm going to go ahead and fix up
some of the other materials.
95:37 Once again,
same thing with the stump mesh here. I need to get rid of that substrate
and then reconnect.
96:06 All right. We got our blueprint back
in, and the varieties looking pretty nice.
96:11 Let's go ahead and, fill in the assets for the rest of our parameters here.
96:17 I don't want to make you
wait while I choose all these assets. So let's just skip ahead to the end
where all of our assets are in.
96:26 All right. I think we have all of our assets
selected. So let's just click the checkbox and turn
them on one by one and see how they look.
96:35 It looks like there's another material
I need to fix up here. That's fine. Same thing as before. Most likely just deleting the substrate
node and reconnecting.
96:45 Let's go back into our settings here
and find that mesh so we can find that material.
96:55 One small tip
in case you don't already know, but you can simply hold down shift
when dragging from
97:01 another node's input to, drag that input to a new node input.
97:09 It's a quick way
so you don't have to reconnect and, look around the graph too much.
97:15 Having a quick look around here,
there are some settings I want to change, with some of the plant density.
97:22 And I see that
some of the plants are a little small. So let's get all of these turned on
and we'll adjust the
97:29 settings altogether at once. Also, I'll show you how the settings
97:34 structure interacts with the blueprint
and the PCG graph.
97:45 So to edit the settings of the PCB,
you simply click the down arrow on the PCG and then down
arrow on the current settings.
97:52 And here you can see
all of the various asset settings listed out.
98:01 The best way to store a multitude of settings
like this is to use a structure. So let's go into the folder
and open up the structure.
98:08 We have that stores all of our settings. Here you can see all the same settings
listed out,
98:13 along
with the type of variable that it is. And if you go to the next tab over,
you can see the default
98:20 values that we have set up. Here's a good place to change any of the values that you feel
that next time you want to use the PCG,
98:28 they should be, set to that by default. Jumping back into the blueprint.
98:34 In order to use this structure, we're going to have to set it up
as a variable to be referenced.
98:40 When selecting the variable type,
make sure and double check that the name is the one that you copied
previously
98:46 in my case, PCG go to settings to. Now that we have a variable
inside of our blueprint,
98:53 we can
then reference it back inside of our PCG using attributes.
99:01 So let's open back up our PCG
and I'll show you exactly how that works here I'm using the node get actor property
99:09 and then within the property name
make sure that you're using the same variable name
that you set earlier.
99:15 When referencing your structure. Here I'm using current settings. So just to be sure I'm going to copy it
and then go back over and paste it.
99:25 That way without a shadow of a doubt, it's the correct name. And in case I haven't mentioned it
earlier, I am using quite
99:34 a few reroute nodes which you can make by,
typing and reroute.
99:40 And it's just a way
to keep the graph much cleaner and not have so many lines
interconnecting.
99:46 So the reroute from the current settings
is then going to these four delete attribute nodes.
99:58 Make sure to change the operation setting from delete to keep only
and then the selected attribute.
100:05 Once again the name has to match exactly
to the name within your structure. So again, copying and pasting is always
a good idea just so you don't mess up.
100:15 Typing. All of the various settings in the structure
are pointing to this particular surface
100:23 sampler node and the various settings
that you can access there. If you wanted to access more settings,
you can click the down carrot
100:31 to access more,
but points per square meter point extents, looseness and speed
100:38 are the most important in my opinion. Okay, now that we have these settings,
100:44 properly set up, let's take a look
at what they actually do.
100:49 I have the small trees here, isolated
along with the large tree. So it's easy to see what's going on.
100:59 In order to change the overall density, I usually change the points
per square meter setting
101:05 here called small trees per square meter.
101:12 Scale min and scale max are also important
to play around with.
101:29 You can randomize the, generation
by changing the seed value to anything you want.
101:44 The last important setting to take note of here
is the point extents. And the best way I can use to describe
this is creating a large
101:54 box around each of these assets. If two boxes cross one another,
that asset is called.
102:01 So it's a way to evenly spaced out, the group of assets, the larger
the boxes,
102:09 the larger the point extents are. The further spaced out the assets will be.
102:16 Using these settings, I'm going to go ahead
and, set up the rest of the assets.
102:23 But I don't want to make you wait
through all of that. So let's just go into super
speed here until I'm done.
102:42 There is, one extra setting here
that I do want to point out, and that within this PCG settings,
we can play with the last transform points
102:51 node in order to lower certain assets
further into the ground.
102:57 So the last of the three boxes here is your Z axis offset.
103:03 And if you want assets
to drop further into the ground just make those a larger negative number.
103:33 I'm actually seeing one more asset here
that I forgot to mention. And this one in particular
is inside of our grass types.
103:43 Let's go back to our landscape materials
folder and open up our grass types and open up
index one.
103:49 You'll see that we still have our flower
placeholder that needs to be replaced.
103:58 Going to quickly sift back
through our megascans assets and quickly
replace out all of our indexes here.
104:22 As you can see, similar to our PCGs,
grass types also have a variety of settings
that you can play with here.
104:28 I'm just going to adjust
these ground cover assets to be a bit smaller and a bit less dense.
104:39 And with that, our Gaia two Unreal Plus
PCG landscape is complete.
104:45 I tried to be as thorough as I could with
this tutorial while also staying concise.
104:50 However, I know I probably skipped over
quite a few topics, so if you have any questions,
please leave them down in the comments.
104:57 Otherwise, have a wonderful week!